{template 'list_header'}
    <div id="main">
    <div class="container-fluid">

        <div class="row-fluid">
            <div class="span12">

                <div class="box">
                    <div class="box-title">
                        <div class="pull-left">
                            <h3><i class="icon-table"></i> 微场景画面 <small>{$app['title']}</small></h3>

                        </div>
                        <div class="pull-right">
                          

                        </div>
                    </div>

                    <div class="box-content">
                       
                        <div class="row-fluid">
                            <div class="span12 control-group">
                                <div class="pull-left">
                                    <a class="btn" href="{php echo $this->createWeburl('page',array('list_id'=>$list_id));}"><i class="icon-plus"></i>新增画面</a>
                                    <a class="btn" href="javascript:location.reload()"><i class="icon-refresh"></i>刷新</a>
                                </div>
                               
                            </div>
                            
                        </div>

                        <div class="row-fluid dataTables_wrapper">
                            <form action="/plus/formajax.php" method="post" class="form-horizontal">
                                <table id="listTable" class="table table-bordered table-hover dataTable">
                                <thead>
                                    <tr>
                                        <th >序号</th>
                                        <th>画面样式</th>
                                        <th>画面</th>
                                        <th class="norightborder">操作</th>
                                    </tr>
                                </thead>
								{loop $list $row}
									<tr>
                                    <td>{$row['listorder']}</td> 
                                    <td><img src="{php echo toimage($row['thumb'])}" style="max-height:80px;max-width:100px;"></td> 
                                    <td>{if $row['m_type']==1}场景1(双图片)
									{elseif $row['m_type']==2}场景2(双图片)
									{elseif $row['m_type']==3}场景3(双图片)
									{elseif $row['m_type']==4}场景4(上下图)
									{elseif $row['m_type']==5}场景4(优酷视频)
									{elseif $row['m_type']==8}多图多文字
									{else}纯图片式{/if}</td> 
                                    <td>
                                     <a class="btn" href="{php echo $this->createWeburl('page',array('list_id'=>$row['list_id'],'id'=>$row['id']))}" rel="tooltip" title="编辑微场景画面"><i class="icon-edit"></i></a>
                                     <a class="btn" rel="tooltip" title="删除" href="javascript:drop_confirm('您确定要删除吗?', '{php echo $this->createWeburl('page',array('op'=>'del','list_id'=>$row['list_id'],'id'=>$row['id']))}');"><i class="icon-remove"></i></a>
                                    </td> 
                                    </tr> 
								{/loop}
                                </table>
                            </form>
                            <!--
                            <div class="dataTables_info" id="DataTables_Table_8_info">Showing <span>1</span> to <span>10</span> of <span>22</span> entries</div>
                            <div class="dataTables_paginate paging_full_numbers" id="DataTables_Table_8_paginate"><a tabindex="0" class="first paginate_button paginate_button_disabled" id="DataTables_Table_8_first">First</a><a tabindex="0" class="previous paginate_button paginate_button_disabled" id="DataTables_Table_8_previous">Previous</a><span><a tabindex="0" class="paginate_active">1</a><a tabindex="0" class="paginate_button">2</a><a tabindex="0" class="paginate_button">3</a></span><a tabindex="0" class="next paginate_button" id="DataTables_Table_8_next">Next</a><a tabindex="0" class="last paginate_button" id="DataTables_Table_8_last">Last</a></div>
                            -->
                             
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<script>

$(function(){
    $(".delAll").click(function(){
        var check = $("#listTable input:checked");
        var id = new Array();
        check.each(function(i){
            id[i] = $(this).val();
        });
        $.post('/plus/formajax.php', {tid:id, aid:$('#aid').val()},function(data){
            G.ui.tips.info(data.error);
        },'json');
    });
});

function drop_confirm(msg, url){
    if(confirm(msg)){
        $.post(url, {},function(data){
            G.ui.tips.info(data.error);
            window.location = data.url;
        },'json');
    }
}
window.document.onkeydown = function(e) {
    if ('BODY' == event.target.tagName.toUpperCase()) {
        var e=e || event;
        var currKey=e.keyCode || e.which || e.charCode;
        if (8 == currKey) {
            return false;
        }
    }
};
</script>
{template 'common/footer'}